[김병화] Week6#261
Open
KimByeongHwa wants to merge 29 commits intocodeit-bootcamp-frontend:part2-김병화from
Hidden character warning
The head ref may contain hidden characters: "part2-\uae40\ubcd1\ud654-week6"
Open
Conversation
| const userName = user?.name; | ||
| const userEmail = user?.email; | ||
| const userProfileImg = user?.profileImageSource; | ||
|
|
Collaborator
There was a problem hiding this comment.
const {name = "", email = "", profileImageSource = ""} = user;| function Card({ link }: CardProps) { | ||
| const getCreatedTime = () => { | ||
| const splitedCreatedAt = link.createdAt.split('-'); | ||
|
|
Collaborator
There was a problem hiding this comment.
아래 58~63번 라인까지의 코드는 앞으로 쓸일이 많아보이네요. /src/utils로 빼서 사용해주시면 됩니다. getFormatedDate()
| return createdTime; | ||
| }; | ||
|
|
||
| const getCreatedBefore = () => { |
Collaborator
There was a problem hiding this comment.
이 친구도 /src/utils로 빼주시면 될 것 같습니다.
| let createdBeforeMessage = ''; | ||
|
|
||
| const splitedCreatedAt = link.createdAt.split('T'); | ||
|
|
Collaborator
There was a problem hiding this comment.
const [year, month, day] = splitedCreatedAt[0].split('-').map(val => Number(val));
const [hour, minute, second] = splitedCreatedAt[1].split(':').map((val, index) => index === 2 ? Number(val.substring(0,2)) : Number(val) );
const createdDate = new Date(year, month, day, hour, minute, second);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요구사항
기본
// 반응형 미구현